package com.abocode.aichat.server.modules.handler;

import com.abocode.aichat.data.ModuleServiceType;
import com.abocode.aichat.server.context.channel.ChannelWrapper;
import com.abocode.aichat.server.context.ServerRuntimeContext;
import com.abocode.aichat.server.modules.ModuleServiceHandler;
import com.abocode.aichat.server.context.delivery.reply.Replies;
import com.abocode.aichat.data.MessageStanza;

/**
 * @author guanxf
 */
public class PresenceOnlineServiceHandler implements ModuleServiceHandler {
    @Override
    public Replies execute(ChannelWrapper channelWrapper, MessageStanza stanza, ServerRuntimeContext serverRuntimeContext) {
        serverRuntimeContext.getProtocolChannelRegistry().presence(channelWrapper.getEntity());
        return null;
    }

    @Override
    public ModuleServiceType moduleServiceType() {
        return ModuleServiceType.PresenceOnline;
    }

}
